<template>
  <BasicDrawer v-bind="$attrs" @register="registerDrawer" destroyOnClose title="产品设置" width="50%" :showFooter="false">
    <CompanyGoodsIndex ref="companyGoodsIndex"></CompanyGoodsIndex>
  </BasicDrawer>
</template>
<script lang="ts" setup>
import { getCurrentInstance } from 'vue';
import { BasicDrawer, useDrawerInner } from '@apps/antd-admin/src/components/drawer';
import CompanyGoodsIndex from '../../companyGoods/index.vue';

const ctx: any = getCurrentInstance();

const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (data) => {
  let record = data.record;
  ctx.refs['companyGoodsIndex'].setSearchInfoProps(record.companyId);
});
</script>
